﻿#Region "Copyright"
'————————————————————————————————————————
'	创建人员(Creator)    ：Huangyd
'	创建日期(Date)       ：2013-03-14
'   联系方式(Email)      ：aj-ayumi@163.com; gajayumi@gmail.com; ajayumi@me.com
'   描    述(Description)：
'
'	Copyright (C) 2012-2013 ajayumi 版权所有
'————————————————————————————————————————
#End Region

Namespace IO
    Public Class Directory

#Region "打开指定路径的文件夹－－OpenFolder(folderPath)"
        ''' <summary>
        ''' 打开指定路径的文件夹
        ''' </summary>
        ''' <param name="folderPath">被打开的文件夹的路径</param>
        ''' <param name="isSelect">是否选中文件</param>
        ''' <returns>返回布尔值，成功返回真，否则为假</returns>
        ''' <remarks></remarks>
        Public Shared Function OpenFolder(ByVal folderPath As String, ByVal isSelect As Boolean) As Boolean
            Try
                If isSelect Then
                    System.Diagnostics.Process.Start("explorer.exe", String.Concat(" /select,", folderPath))
                Else
                    System.Diagnostics.Process.Start("explorer.exe", folderPath)
                End If
            Catch ex As Exception
                Throw ex
            End Try

            Return False
        End Function
#End Region

    End Class
End Namespace

